    <div id="name"></div>
    <script>
        // console.log('-------');
        axios.get('/userInfo')
            .then(res => {
                // console.log(res);
                if(res.data.code == 401) {
                    window.location.href = '/login'
                }
                if(res.data.code == 200) {
                    const {user} = res.data.user
                    // console.log(user,"//////");
                    document.getElementById('name').innerHTML = user.name

                }
            })
    </script>